home *** CD-ROM | disk | FTP | other *** search
- class classes.enemy.HeadBoss
- {
- var x;
- var y;
- var moveScript;
- var id;
- var lifeOrig;
- var clip;
- var trans;
- var colorTrans;
- var dir;
- var flying;
- var axis;
- var xDest;
- var yDest;
- var ep;
- var edge;
- var dc;
- var fireDir;
- var oldDir;
- var xMov = 0;
- var yMov = 0;
- var xMovT = 0;
- var yMovT = 0;
- var speedOrig = 8;
- var speed = 8;
- var f2 = "flying";
- var xDestMet = false;
- var yDestMet = false;
- var c = 0;
- var life = 900;
- var nc = 0;
- var xA = 0;
- var yA = 0;
- var nudging = false;
- var hc = 0;
- var cv = 0.3;
- var intro = true;
- var moveScripting = true;
- var power = 25;
- var wc = 0;
- var armOff = "";
- var Name = "headBoss";
- function HeadBoss(px, py, pmoveScript, pid)
- {
- this.x = px;
- this.y = py;
- this.moveScript = pmoveScript.slice();
- this.id = pid;
- this.speed *= _root.dif.speed;
- this.speedOrig = this.speed;
- this.life *= _root.dif.life;
- this.lifeOrig = this.life;
- _root.d = _root.d + 1;
- this.clip = _root.attachMovie("headBoss","headBoss" + this.id + "Clip",_root.d + 10000);
- this.clip._x = this.x;
- this.clip._y = this.y;
- this.trans = new flash.geom.Transform(this.clip);
- this.colorTrans = new flash.geom.ColorTransform(1,1,1,1,0,0,0,0);
- _root.stats.created = _root.stats.created + 1;
- this.fly();
- this.parseMoveScript();
- }
- function nudge(pxA, pyA, pscale)
- {
- this.nc = 0;
- this.nudging = true;
- var _loc2_ = pscale / 100;
- this.xA = pxA * _loc2_;
- this.yA = pyA * _loc2_;
- }
- function parseMoveScript()
- {
- var _loc2_ = this.dir;
- this.dir = this.moveScript[0];
- if(this.dir == "break")
- {
- delete this.moveScript;
- this.moveScripting = false;
- if(this.flying)
- {
- if(_loc2_ == "L" || _loc2_ == "R")
- {
- this.clip.body["arm" + _loc2_].gotoAndPlay("flyStop");
- }
- this.clip.body.flame.gotoAndStop("still");
- this.speed /= 2;
- this.flying = false;
- this.cv = 0.4;
- this.f2 = "wander";
- this.intro = false;
- }
- this[this.axis + "MovT"] = 0;
- this.f2 = "wander";
- this.newDir();
- }
- else if(this.dir == "summon")
- {
- delete this.moveScript;
- this.moveScripting = false;
- this.xMovT = 0;
- this.yMovT = 0;
- this.c = 0;
- this.f2 = "summoning";
- }
- else
- {
- this[this.axis + "MovT"] = 0;
- this.f2 = "gotoXYDest";
- this.axis = !(this.dir == "L" || this.dir == "R") ? "y" : "x";
- this[this.axis + "MovT"] = !(this.dir == "L" || this.dir == "U") ? this.speed : -1 * this.speed;
- if(this.dir == "L" || this.dir == "U")
- {
- this[this.axis + "Dest"] = Math.round(this[this.axis] - this.moveScript[1]);
- }
- else
- {
- this[this.axis + "Dest"] = Math.round(this[this.axis] + this.moveScript[1]);
- }
- this.moveScript.splice(0,2);
- }
- }
- function gotoXYDest()
- {
- if(Math.abs(this[this.axis + "Dest"] - this[this.axis]) < this.speed + 1)
- {
- if(this.axis == "x")
- {
- this.x = this.xDest;
- }
- else
- {
- this.y = this.yDest;
- }
- this.parseMoveScript();
- }
- }
- function getDirString()
- {
- if(this.xMovT < -1)
- {
- this.dir = "L";
- }
- else if(this.xMovT > 1)
- {
- this.dir = "R";
- }
- else if(this.yMovT > 1)
- {
- this.dir = "D";
- }
- else if(this.yMovT < -1)
- {
- this.dir = "U";
- }
- }
- function fly()
- {
- this.wc = 0;
- this.flying = true;
- this.speed = this.speedOrig * 2;
- if(this.f2 == "wait")
- {
- this[this.axis + "MovT"] = !(this.dir == "L" || this.dir == "U") ? this.speed : -1 * this.speed;
- this.getDirString();
- this.f2 = "wander";
- }
- this.clip.body["arm" + this.dir].gotoAndPlay("flyStart");
- this.clip.body.flame.gotoAndStop("fly" + this.dir);
- this.clip.body.flame.clip.gotoAndPlay("start");
- this.c = 0;
- this.ep = _root.randRange(10,60);
- this.ep *= _root.dif.speed;
- this.cv = 1 * _root.dif.speed;
- }
- function flyStop()
- {
- if(this.clip.body.armL.flying)
- {
- this.clip.body.armL.gotoAndPlay("flyStop");
- }
- if(this.clip.body.armR.flying)
- {
- this.clip.body.armR.gotoAndPlay("flyStop");
- }
- this.clip.body.flame.gotoAndStop("still");
- this.speed /= 2;
- this.flying = false;
- this.cv = 0.5;
- this.f2 = "wander";
- }
- function newDir()
- {
- if(random(10) > 1)
- {
- this[this.axis + "MovT"] = 0;
- this.dir = _root.getDir(this.x,this.y);
- this.axis = !(this.dir == "L" || this.dir == "R") ? "y" : "x";
- this[this.axis + "MovT"] = !(this.dir == "L" || this.dir == "U") ? this.speed : -1 * this.speed;
- }
- else
- {
- this[this.axis + "MovT"] = 0;
- this.axis = this.axis != "y" ? "y" : "x";
- this[this.axis + "MovT"] = random(2) <= 0 ? -1 * this.speed : this.speed;
- this.getDirString();
- }
- }
- function wander()
- {
- if(this.flying)
- {
- this.wc = this.wc + 1;
- if(this.wc > 5 + _root.dif.wait * 2)
- {
- if(random(100) > 95 + _root.dif.wait * 2 && !this.edge)
- {
- this.newDir();
- this.wc = 0;
- }
- }
- }
- else if(random(100) > 91 + _root.dif.wait * 2 && !this.edge)
- {
- if(random(100) > 95)
- {
- this.xMovT = 0;
- this.yMovT = 0;
- this.f2 = "wait";
- this.c = 0;
- this.ep = _root.randRange(20,90);
- this.ep *= 1 / _root.dif.speed;
- }
- else
- {
- this.newDir();
- }
- }
- }
- function wait()
- {
- this.c = this.c + 1;
- if(this.c >= this.ep)
- {
- this.f2 = "wander";
- this.newDir();
- }
- if(random(100) > 95)
- {
- var _loc2_ = ["L","R","F"];
- this.dir = _loc2_[random(_loc2_.length)];
- }
- }
- function death()
- {
- this.dc = this.dc + 1;
- this.xA = _root.randRange2(-1 * this.dc / 40,1 * this.dc / 40);
- this.yA = _root.randRange2(-1 * this.dc / 40,1 * this.dc / 40);
- this.colorTrans.redOffset = _root.randRange(0,this.dc * 3);
- var _loc6_ = _root.randRange(0,this.dc * 2.5);
- this.colorTrans.greenOffset = _root.randRange(0,_loc6_);
- this.colorTrans.blueOffset = _root.randRange(0,_loc6_);
- this.trans.colorTransform = this.colorTrans;
- if(random(3) == 1)
- {
- var _loc5_ = ["red","blue"];
- var _loc8_ = this.x - 20 + this.clip._width / 2 + _root.randRange(-1 * (this.dc / 4),this.dc / 4);
- var _loc7_ = this.y + this.clip._height / 2 + _root.randRange(-1 * (this.dc / 4),this.dc / 4);
- if(random(2) == 1)
- {
- _root.createExploA([_loc8_,_loc7_,_root.randRange(this.dc / 4,this.dc * 1),_root.randRange(0,50),"Red"]);
- }
- _root["gunSmoke" + this.dc] = new classes.fx.GunSmoke(_loc8_,_loc7_,this.dc);
- _root.addFX("gunSmoke" + this.dc);
- }
- if(this.dc == 1)
- {
- _root.aC1.s1.stop();
- _root.audio.playLevel2("headBossEnd",35);
- var _loc3_ = 1;
- var _loc4_ = _root.chars.length;
- _loc5_ = _root.chars.slice();
- while(_loc3_ < _loc4_)
- {
- _root[_loc5_[_loc3_]].bombed(20);
- _loc3_ = _loc3_ + 1;
- }
- _loc3_ = 0;
- _loc4_ = _root.enemyShots.length;
- _loc5_ = _root.enemyShots.slice();
- while(_loc3_ < _loc4_)
- {
- _root[_loc5_[_loc3_]].bombed();
- _loc3_ = _loc3_ + 1;
- }
- this.xMovT = 0;
- this.yMovT = 0;
- this.clip.body.armL.gotoAndPlay("death");
- this.clip.body.armR.gotoAndPlay("death");
- this.clip.body.eyes.gotoAndPlay("death");
- this.clip.body.flame.gotoAndStop("still");
- }
- if(this.dc == 100)
- {
- this.clip.body.armL.gotoAndPlay("death2");
- this.clip.body.armR.gotoAndPlay("death2");
- }
- if(this.dc == 150)
- {
- _root.audio.playLevel2("headBossX",40);
- _loc3_ = 0;
- _loc4_ = _root.randRange(5,8);
- while(_loc3_ < _loc4_)
- {
- _root.createExploA([this.x + this.clip._width / 2 + _root.randRange(-50,50),this.y + this.clip._height / 2 + _root.randRange(-50,50),_root.randRange(80,150),_root.randRange(75,100),"Blue"]);
- _loc3_ = _loc3_ + 1;
- }
- _loc3_ = 0;
- _loc4_ = _root.randRange(8,12);
- while(_loc3_ < _loc4_)
- {
- _root.createShrapnel([this.x + this.clip._width / 2,this.y + this.clip._height / 2,"headBoss","Blue",true]);
- _loc3_ = _loc3_ + 1;
- }
- _root.createPowerUp([this.x,this.y,"coin5"]);
- _root.createPowerUp([this.x,this.y,"coin5"]);
- _root.createPowerUp([this.x,this.y,"coin10"]);
- _root.createPowerUp([this.x,this.y,"coin10"]);
- _loc3_ = 0;
- while(_loc3_ < 2)
- {
- _root.createPowerUp([this.x,this.y,"coin25"]);
- _loc3_ = _loc3_ + 1;
- }
- _root.createPowerUp([this.x,this.y,"lifeMax"]);
- _root.createPowerUp([this.x,this.y,"shield"]);
- _root.boss = false;
- _root.initLevel3();
- _root.stats.destroyed = _root.stats.destroyed + 1;
- _root.stats.score += 250000;
- _root.removeChar("headBoss" + this.id);
- this.f2 = "";
- }
- }
- function fire()
- {
- this.f2 = "firing";
- this.xMovT = 0;
- this.yMovT = 0;
- this.c = 0;
- }
- function firing()
- {
- this.c = this.c + 1;
- if(this.c == 2)
- {
- this.fireDir = this.x <= _root[_root.char].x ? "R" : "L";
- if(this.fireDir == this.armOff)
- {
- this.f2 = "wander";
- this.newDir();
- }
- else
- {
- _root.audio.playLevel2("headBossFire",30);
- }
- }
- if(this.c == 15)
- {
- this.clip.body["arm" + this.fireDir].gotoAndPlay("fire");
- }
- if(this.c == 33)
- {
- var _loc5_ = Math.ceil(Math.abs((this.y - _root[_root.char].y) / 100));
- var _loc3_ = 0;
- var _loc6_ = this.fireDir != "L" ? this.x + 21 : this.x - 33;
- var _loc8_ = this.y + 9;
- var _loc7_ = this.fireDir != "L" ? 6 : -6;
- while(_loc3_ < 5)
- {
- var _loc4_ = (_loc5_ * -2 + _loc5_ * _loc3_) * 1.5;
- _root.enemyShotID = _root.enemyShotID + 1;
- _root["headBossBlastA" + _root.enemyShotID] = new classes.shots.HeadBossBlastA(_loc6_,_loc8_,_loc7_,_loc4_,_root.enemyShotID);
- _root.addEnemyShot("headBossBlastA" + _root.enemyShotID);
- _loc3_ = _loc3_ + 1;
- }
- }
- if(this.c == 45)
- {
- this.f2 = "wander";
- this.newDir();
- }
- }
- function summon()
- {
- this.moveScripting = true;
- this.moveScript = [];
- if(this.y - 300 >= 0)
- {
- this.moveScript.push("U");
- }
- else
- {
- this.moveScript.push("D");
- }
- this.moveScript.push(Math.round(Math.abs(this.y - 300)));
- if(this.x - 500 >= 0)
- {
- this.moveScript.push("L");
- }
- else
- {
- this.moveScript.push("R");
- }
- this.moveScript.push(Math.round(Math.abs(this.x - 500)));
- this.moveScript.push("summon");
- this.parseMoveScript();
- }
- function summoning()
- {
- this.c = this.c + 1;
- if(this.c == 10)
- {
- this.clip.body.armL.gotoAndPlay("summon");
- this.clip.body.armR.gotoAndPlay("summon");
- this.clip.body.eyes.gotoAndStop("F");
- this.clip.body.eyes.clip.gotoAndPlay("glow");
- this.clip.body.brain.gotoAndPlay("glow");
- _root.audio.playLevel2("headBossSummon",30);
- }
- if(this.c == 20)
- {
- var _loc3_ = random(6);
- if(_loc3_ == 0)
- {
- _root.createHeadSummon(["A",[this.x - 75,this.y + 10,["break"]]]);
- _root.createHeadSummon(["A",[this.x + 95,this.y + 10,["break"]]]);
- _root.createHeadSummon(["A",[this.x,this.y - 75,["break"]]]);
- _root.createHeadSummon(["A",[this.x,this.y + 100,["break"]]]);
- }
- else if(_loc3_ == 1)
- {
- _root.createHeadSummon(["A",[this.x - 75,this.y + 10,["break"]]]);
- _root.createHeadSummon(["A",[this.x + 95,this.y + 10,["break"]]]);
- _root.createHeadSummon(["A",[this.x,this.y - 75,["break"]]]);
- _root.createHeadSummon(["A",[this.x,this.y + 100,["break"]]]);
- _root.createHeadSummon(["A",[this.x - 60,this.y - 60,["break"]]]);
- _root.createHeadSummon(["A",[this.x + 80,this.y - 60,["break"]]]);
- _root.createHeadSummon(["A",[this.x + 80,this.y + 80,["break"]]]);
- _root.createHeadSummon(["A",[this.x - 60,this.y + 80,["break"]]]);
- }
- else if(_loc3_ == 2)
- {
- _root.createHeadSummon(["B",[this.x - 75,this.y + 10,["break"]]]);
- _root.createHeadSummon(["B",[this.x + 95,this.y + 10,["break"]]]);
- _root.createHeadSummon(["B",[this.x,this.y - 75,["break"]]]);
- _root.createHeadSummon(["B",[this.x,this.y + 100,["break"]]]);
- }
- else if(_loc3_ == 3)
- {
- _root.createHeadSummon(["B",[this.x - 75,this.y + 10,["break"]]]);
- _root.createHeadSummon(["B",[this.x + 95,this.y + 10,["break"]]]);
- _root.createHeadSummon(["B",[this.x,this.y - 75,["break"]]]);
- _root.createHeadSummon(["B",[this.x,this.y + 100,["break"]]]);
- _root.createHeadSummon(["B",[this.x - 60,this.y - 60,["break"]]]);
- _root.createHeadSummon(["B",[this.x + 80,this.y - 60,["break"]]]);
- _root.createHeadSummon(["B",[this.x + 80,this.y + 80,["break"]]]);
- _root.createHeadSummon(["B",[this.x - 60,this.y + 80,["break"]]]);
- }
- else if(_loc3_ == 4)
- {
- _root.createHeadSummon(["C",[this.x - 75,this.y + 10,["break"]]]);
- _root.createHeadSummon(["C",[this.x + 95,this.y + 10,["break"]]]);
- _root.createHeadSummon(["C",[this.x,this.y - 75,["break"]]]);
- _root.createHeadSummon(["C",[this.x,this.y + 100,["break"]]]);
- }
- else
- {
- _root.createHeadSummon(["C",[this.x - 75,this.y + 10,["break"]]]);
- _root.createHeadSummon(["C",[this.x + 95,this.y + 10,["break"]]]);
- _root.createHeadSummon(["C",[this.x,this.y - 75,["break"]]]);
- _root.createHeadSummon(["C",[this.x,this.y + 100,["break"]]]);
- _root.createHeadSummon(["C",[this.x - 60,this.y - 60,["break"]]]);
- _root.createHeadSummon(["C",[this.x + 80,this.y - 60,["break"]]]);
- _root.createHeadSummon(["C",[this.x + 80,this.y + 80,["break"]]]);
- _root.createHeadSummon(["C",[this.x - 60,this.y + 80,["break"]]]);
- }
- }
- if(this.c == 45)
- {
- this.f2 = "wander";
- this.newDir();
- }
- }
- function main()
- {
- _root.f2 = this.f2;
- _root.flying = this.flying;
- this[this.f2]();
- if(this.flying)
- {
- if(!this.moveScripting)
- {
- this.c = this.c + 1;
- if(this.c >= this.ep)
- {
- this.flyStop();
- }
- }
- }
- if(this.oldDir != this.dir)
- {
- _root.oldDir = this.oldDir;
- _root.dir = this.dir;
- if(this.oldDir == undefined || this.dir == "F")
- {
- this.clip.body.eyes.gotoAndStop(this.dir);
- }
- else if(this.dir == "U" || this.dir == "D")
- {
- this.clip.body.eyes.gotoAndStop(this.oldDir);
- }
- else if(random(3) > 0)
- {
- if(this.dir == "R")
- {
- this.clip.body.eyes.gotoAndPlay("LtoR");
- }
- else
- {
- this.clip.body.eyes.gotoAndPlay("RtoL");
- }
- }
- else
- {
- this.clip.body.eyes.gotoAndPlay("spin" + this.dir);
- }
- if(this.flying)
- {
- this.clip.body.flame.gotoAndStop("fly" + this.dir);
- if(this.oldDir == "U" || this.oldDir == "D")
- {
- if(this.dir == "L" || this.dir == "R")
- {
- this.clip.body["arm" + this.dir].gotoAndPlay("flyStart");
- }
- }
- else if(this.dir == "U" || this.dir == "D")
- {
- this.clip.body["arm" + this.oldDir].gotoAndPlay("flyStop");
- }
- else
- {
- this.clip.body["arm" + this.oldDir].gotoAndPlay("flyStop");
- this.clip.body["arm" + this.dir].gotoAndPlay("flyStart");
- }
- }
- }
- this.oldDir = this.dir;
- if(random(100) > 96 + _root.dif.wait && this.f2 != "death")
- {
- if(!this.moveScripting && !this.flying && this.f2 != "summoning" && this.f2 != "firing" && !this.edge)
- {
- var _loc9_ = random(10);
- if(_loc9_ < 3)
- {
- this.fly();
- }
- else if(_loc9_ >= 3 && _loc9_ < 6)
- {
- if(_root.chars.length < 12)
- {
- this.summon();
- }
- }
- else
- {
- this.fire();
- }
- }
- }
- if(this.nudging)
- {
- this.xA *= 0.5;
- this.yA *= 0.5;
- this.nc = this.nc + 1;
- var _loc10_ = 255 - this.nc * 17;
- this.colorTrans.redOffset = _loc10_;
- this.trans.colorTransform = this.colorTrans;
- if(this.nc == 15)
- {
- this.xA = this.yA = 0;
- this.nudging = false;
- this.colorTrans.redOffset = 0;
- this.trans.colorTransform = this.colorTrans;
- }
- }
- var _loc4_ = 0;
- var _loc5_ = _root.broShots.length;
- while(_loc4_ < _loc5_)
- {
- var _loc7_ = _root.broShots[_loc4_] + "Clip";
- if(this.clip.hitTest(_root[_loc7_]))
- {
- if(this.x < 950 && this.x > 0 && this.y > 0 && this.y < 550 && this.f2 != "death")
- {
- var _loc3_ = _root.broShots[_loc4_];
- var _loc6_ = this.life;
- this.life -= _root[_loc3_].power;
- this.clip.body.d1.gotoAndStop(Math.ceil((100 - this.life / this.lifeOrig * 100) / 20));
- if(this.clip.body.d1._currentframe == 5 && this.armOff == "")
- {
- this.armOff = random(2) != 0 ? "R" : "L";
- this.clip.body["arm" + this.armOff]._visible = false;
- _root.audio.playLevel2("headBossX",20);
- _loc4_ = 0;
- _loc5_ = _root.randRange(3,5);
- while(_loc4_ < _loc5_)
- {
- _root.createExploA([this.x + this.clip._width / 2 + _root.randRange(-25,25),this.y + this.clip._height / 2 + _root.randRange(-25,25),_root.randRange(50,80),_root.randRange(75,100),"Red"]);
- _loc4_ = _loc4_ + 1;
- }
- _loc4_ = 0;
- _loc5_ = _root.randRange(2,4);
- while(_loc4_ < _loc5_)
- {
- _root.createShrapnel([this.x + this.clip._width / 2,this.y + this.clip._height / 2,"headBossArmA"]);
- _loc4_ = _loc4_ + 1;
- }
- _root.createShrapnel([this.x + this.clip._width / 2,this.y + this.clip._height / 2,"headBossArmB"]);
- }
- if(this.life < 1)
- {
- this.f2 = "death";
- this.dc = 0;
- }
- else
- {
- this.nudge(_root[_loc3_].xMov,_root[_loc3_].yMov,10);
- _root.audio.playLevel4("headHit" + (random(4) + 1),_root.randRange(10,25));
- if(random(10) > 7)
- {
- var _loc12_ = this.x - 20 + this.clip._width / 2 + _root.randRange(-20,20);
- var _loc11_ = this.y + this.clip._height / 2 + _root.randRange(-20,20);
- _root.fxID = _root.fxID + 1;
- _root["gunSmoke" + _root.fxID] = new classes.fx.GunSmoke(_loc12_,_loc11_,_root.fxID);
- _root.addFX("gunSmoke" + _root.fxID);
- }
- if(!this.moveScripting && this.f2 != "summoning" && this.f2 != "firing")
- {
- this[this.axis + "MovT"] = 0;
- this.axis = this.axis != "y" ? "y" : "x";
- this[this.axis + "MovT"] = random(2) <= 0 ? -1 * this.speed : this.speed;
- this.getDirString();
- if(random(10) > 8)
- {
- this.fly();
- }
- }
- }
- }
- _root[_root.char].fc = _root[_root.char].fireFreq - _root.rapidVar;
- _root[_loc3_].exploX = this.x + this.clip._width / 2;
- _root[_loc3_].exploY = this.y + this.clip._height / 2;
- _root[_loc3_].hit(_loc6_);
- }
- _loc4_ = _loc4_ + 1;
- }
- if(this.clip.hitTest(_root[_root.char + "Clip"]))
- {
- _root[_root.char].hit(this.xMov,this.yMov,100,this.power);
- }
- if(!this.intro)
- {
- this.edge = false;
- if(this.x > 800)
- {
- this.edge = true;
- this.dir = "L";
- }
- else if(this.x < 200)
- {
- this.edge = true;
- this.dir = "R";
- }
- else if(this.y < 150)
- {
- this.edge = true;
- this.dir = "D";
- }
- else if(this.y > 450)
- {
- this.edge = true;
- this.dir = "U";
- }
- if(this.edge)
- {
- this[this.axis + "MovT"] = 0;
- this.axis = !(this.dir == "L" || this.dir == "R") ? "y" : "x";
- this[this.axis + "MovT"] = !(this.dir == "L" || this.dir == "U") ? this.speed : -1 * this.speed;
- this.getDirString();
- }
- }
- if(this.xMovT < this.xMov)
- {
- this.xMov -= this.cv;
- }
- else if(this.xMovT > this.xMov)
- {
- this.xMov += this.cv;
- }
- else
- {
- this.xMov = this.xMovT;
- }
- if(this.yMovT < this.yMov)
- {
- this.yMov -= this.cv;
- }
- else if(this.yMovT > this.yMov)
- {
- this.yMov += this.cv;
- }
- else
- {
- this.yMov = this.yMovT;
- }
- if(random(100) > 98)
- {
- if(this.f2 != "summoning")
- {
- this.clip.body.eyes.clip.gotoAndPlay("blink");
- }
- }
- var _loc8_ = this.life - 500;
- if(_loc8_ < 0)
- {
- _loc8_ = 8;
- }
- if(_loc8_ < -250)
- {
- _loc8_ = 3;
- }
- if(_loc8_ < -400)
- {
- _loc8_ = 1;
- }
- if(random(_loc8_) == 0)
- {
- _loc12_ = this.x - 20 + this.clip._width / 2 + _root.randRange(-20,20);
- _loc11_ = this.y + this.clip._height / 2 + _root.randRange(-20,20);
- _root.fxID = _root.fxID + 1;
- _root["gunSmoke" + _root.fxID] = new classes.fx.GunSmoke(_loc12_,_loc11_,_root.fxID);
- _root.addFX("gunSmoke" + _root.fxID);
- }
- this.x += this.xMov + this.xA;
- this.y += this.yMov + this.yA + 0.5 * Math.sin(this.hc += 0.08);
- this.clip._x = this.x;
- this.clip._y = this.y;
- }
- }
-